const Router = require('koa-router');
const router = new Router();
const {db, QueryTypes} = require("../../models/db");

router.post('/bill/getSystemParams', async ctx => {
    try {
        let user = ctx.user
        let tenantId = user.tenantId;
        let model = await db.models['options'].findOne({
            where: {
                tenantId,
                name: 'system'
            }
        })
        let pars = JSON.parse(model.value)
return ctx.suc('', pars)

    } catch (e) {
        return ctx.err('操作失败')
    }
})

module.exports = router;
